package com.hyq.grid.util;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;


@Component
@ConfigurationProperties(prefix = "application")
public class ProjectConfig {
    static String winpath;
    static String profile;

    public static String getWinpath() {
        return winpath;
    }

    public  void setWinpath(String winpath) {
        ProjectConfig.winpath = winpath;
    }

    public static String getProfile() {
        return profile;
    }

    public  void setProfile(String profile) {
        ProjectConfig.profile = profile;
    }

    public static String getPath() {
        String os = System.getProperty("os.name");
        if (os.toLowerCase().startsWith("win")) {
            return winpath;
        } else {
            return null;
        }
    }
}
